import expose
import re
model=expose.SoilExposeModel()
varnames=[]
pattern= r'[a-zA-Z]\w*'
for i in range(1,39):
    #用反射机制获取model对象中的A1-A38
    matchObj = re.findall(pattern, getattr(model,"A"+str(i)).exp) 
    varnames.extend(matchObj)
varnames=list(set(varnames)) #去重转成list
params={}
import random
for name in varnames:
    params[name]=random.random()
print(params)